package com.flutter_ecg.flutter_ecg.ecgapplication.utils;

import android.content.Context;
import android.content.SharedPreferences;
import android.text.TextUtils;

import static com.flutter_ecg.flutter_ecg.ecgapplication.utils.Constants.ECGDEVICEID_KEY_NAME;
import static com.flutter_ecg.flutter_ecg.ecgapplication.utils.Constants.SP_ECGDEVICEID_NAME;

public class BondDeviceUtil {
    public static boolean hasBondDevice(Context context) {
        String deviceid = "";
        SharedPreferences sharedPreferences = context.getSharedPreferences(SP_ECGDEVICEID_NAME, Context.MODE_PRIVATE);
        deviceid = sharedPreferences.getString(ECGDEVICEID_KEY_NAME, "");
        return !TextUtils.isEmpty(deviceid);
    }
}
